export const figureTwoOption = {
  title: {
    text: '升级漏斗图'
  },
  tooltip: {
    trigger: 'item',
    formatter: function ({data}) {
      return data.name + '<br>' + '总数：' + data.totalCount + '<br>' + '成功：' + data.count
    }
  },
  legend: {
    left: 'left',
    top:'30%',
    width: '10%',
    data: ['双向认证', '注册', '登录', '获取ECU版本', '大版本同步']
  },
  series: [
    {
      name: 'Expected',
      type: 'funnel',
      left: '20%',
      width: '65%',
      minSize: '20%',
      label: {
        formatter: '{b}'
      },
      labelLine: {
        show: true
      },
      itemStyle: {
        opacity: 1,
        normal: {
          color: function (params) {
            let colorList = [
              '#266abc', '#3a9ffd', '#5cb4fd',
              '#7ec7fd', '#c2e9fd', '#266abc',
              '#3a9ffd', '#5cb4fd'];
            return colorList[params.dataIndex]
          },
        }
      },
      emphasis: {
        label: {
          position: 'left',
          formatter: '{b} : {c}%'
        }
      },
      data: [
        // { value: 0, name: '双向认证'},
        // { value: 0, name: '注册'},
        // { value: 0, name: '登录'},
        // { value: 0, name: '获取ECU版本'},
        // { value: 0, name: '大版本同步'},
        // { value: 0, name: '检测新版本'},
      ]
    },
    {
      name: 'Expected',
      type: 'funnel',
      left: '20%',
      width: '65%',
      label: {
        position: 'center',
        formatter: '{c}%'
      },
      minSize: '20%',
      itemStyle: {
        opacity: 1,
        normal: {
          color: function (params) {
            let colorList = [
              '#266abc', '#3a9ffd', '#5cb4fd',
              '#7ec7fd', '#c2e9fd', '#266abc',
              '#3a9ffd', '#5cb4fd'];
            return colorList[params.dataIndex]
          },
        }
      },
      data: [
        // { value: 0, name: '双向认证'},
        // { value: 0, name: '注册'},
        // { value: 0, name: '登录'},
        // { value: 0, name: '获取ECU版本'},
        // { value: 0, name: '大版本同步'},
        // { value: 0, name: '检测新版本'},
      ]
    }
  ]
};